package com.qfjy.service.impl.example2;

import com.qfjy.mq.QueueTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @ClassName WeatherServiceImpl
 * @Description TODO
 * @Author guoweixin
 * @Date 2022/4/1
 * @Version 1.0
 */
@Service
@Slf4j
public class WeatherServiceImpl {

    /**
     * TODO  京东天气预报的业务逻辑
     */
    @RabbitListener(queues = {QueueTask.QUEUE_NAME_JD_FANOUT_WEATHER})
     public void weatherJdInfo(String cityMsg){

         log.info("京东天气预报最新信息是："+cityMsg);
     }


    /**
     * TODO  淘宝天气预报的业务逻辑
     */
    @RabbitListener(queues = {QueueTask.QUEUE_NAME_TB_FANOUT_WEATHER})
    public void weatherTbInfo(String cityMsg){
        log.info("淘宝天气预报最新信息是："+cityMsg);

    }
}
